class CreateDatingQuestions < ActiveRecord::Migration
  def self.up
    create_table :dating_questions do |t|
			t.string :title, :null => false, :limit => 500
			t.string :content, :null => false, :limit => 7000
			t.string :content_add, :null => true, :limit => 2000
			t.integer :cat1_id 
			t.string :cat1_name
			t.integer :cat2_id 
			t.string :cat2_name
			t.integer :cat3_id 
			t.string :cat3_name
			t.boolean :status, :default => 0
			t.integer :sort_order, :default => 0
			t.integer :user_id, :null => true
			t.string :user_name, :null => true
			t.integer :reply_count, :default => 0
			t.string :search_keys, :limit => 1000
			t.string :meta_keyword, :limit => 500
			t.string :meta_description, :limit => 800
			t.boolean :is_render, :default => false
      t.timestamps
    end
    add_index :dating_questions, :title
  end

  def self.down
    drop_table :dating_questions
  end
end
